<?php

namespace common\models\survey;

use Yii;

/**
 * This is the model class for table "{{%survey_solution}}".
 *
 * @property int $id
 * @property int $survey_id 排查ID
 * @property int $user_id 方案用户ID
 * @property string $pretreatment 治理前防范措施
 * @property string $solution 治理措施
 * @property int $status 状态
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class SurveySolution extends \common\db\ActiveRecord {

    /**
     * 状态
     */
    const STATUS_ACTIVE = 10;
    const STATUS_DEFAULT = 0;

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%survey_solution}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['survey_id', 'user_id', 'status', 'created_at', 'updated_at'], 'integer'],
            [['pretreatment', 'solution'], 'string'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'survey_id' => '排查ID',
            'user_id' => '方案用户ID',
            'pretreatment' => '治理前防范措施',
            'solution' => '治理措施',
            'status' => '状态',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

}
